From: Julien Grall Date: Wed, 7 Dec 2016 12:33:47 +0000 (+0000) Subject: xen/arm: vgic: Clean-up the sysreg emulation X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3232 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:///%22http:/www.example.com/cgi/%22https:/?a=commitdiff_plain;h=fcf39f46719f7b2ac24114467d76230c7c1de108;p=xen.git xen/arm: vgic: Clean-up the sysreg emulation Couple of clean-up for the vgic sysreg emulation: - Reference the public documentation rather than a non-public one - Let the vgic emulation decides whether a register needs to be emulated - Drop unnecessary debug printk. They don't bring much information and can be misleading (vGICv2 does not support those registers) Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index fb07ae1d67..1fe02cb5cc 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2261,23 +2261,15 @@ static void do_sysreg(struct cpu_user_regs *regs, /* * HCR_EL2.FMO or HCR_EL2.IMO * - * ARMv8: GIC Architecture Specification (PRD03-GENC-010745 24.0) - * Section 4.6.8. + * GIC Architecture Specification (IHI 0069C): Section 4.6.3 */ case HSR_SYSREG_ICC_SGI1R_EL1: + case HSR_SYSREG_ICC_ASGI1R_EL1: + case HSR_SYSREG_ICC_SGI0R_EL1: + if ( !vgic_emulate(regs, hsr) ) - { - dprintk(XENLOG_WARNING, - "failed emulation of sysreg ICC_SGI1R_EL1 access\n"); return inject_undef64_exception(regs, hsr.len); - } break; - case HSR_SYSREG_ICC_SGI0R_EL1: - case HSR_SYSREG_ICC_ASGI1R_EL1: - /* TBD: Implement to support secure grp0/1 SGI forwarding */ - dprintk(XENLOG_WARNING, - "Emulation of sysreg ICC_SGI0R_EL1/ASGI1R_EL1 not supported\n"); - return inject_undef64_exception(regs, hsr.len); /* * ICC_SRE_EL2.Enable = 0